Skip to content

feat(cli): implement official urBackend CLI (@urbackend/cli) - #340

Merged
yash-pouranik merged 14 commits into
geturbackend:mainfrom
Nitin-kumar-yadav1307:feat/official-cli
Jun 28, 2026
Merged

feat(cli): implement official urBackend CLI (@urbackend/cli)#340
yash-pouranik merged 14 commits into
geturbackend:mainfrom
Nitin-kumar-yadav1307:feat/official-cli

Conversation

@Nitin-kumar-yadav1307

@Nitin-kumar-yadav1307 Nitin-kumar-yadav1307 commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Implements the official ub CLI for urBackend — a Node.js/TypeScript command-line tool that lets developers and AI agents manage urBackend projects without opening the dashboard.

Closes #[issue number]


What's new

New package — sdks/urbackend-cli

A fully working CLI published as @urbackend/cli with the binary ub. Built with TypeScript, Commander.js, and tsup. Zero runtime dependencies beyond commander.

Commands implemented

Command Description
ub login Authenticate with a Personal Access Token
ub logout Remove stored credentials from this machine
ub whoami Show the authenticated developer profile
ub project list List all accessible projects with usage stats
ub project use [name|id] Set the active project (interactive or direct)
ub project info [id] Show full project details and collections
ub collection list List collections with schema and RLS preview
ub collection delete <name> Delete a collection with confirmation prompt
ub status Show account plan, usage limits, and recent activity
ub doctor Run diagnostic checks on CLI setup
ub doctor --json Same output as JSON for CI/AI agent consumption

Package structure

sdks/urbackend-cli/
├── bin/ub.js                        # Shebang entry point
├── src/
│   ├── index.ts                     # CLI root, all commands registered
│   ├── core/
│   │   ├── api.ts                   # Central HTTP client, PAT injection
│   │   ├── config.ts                # Atomic config read/write
│   │   ├── constants.ts             # Paths, defaults
│   │   ├── errors.ts                # APIError class
│   │   └── logger.ts                # ✓ ✖ ⚠ terminal output
│   ├── types/                       # TypeScript interfaces for all API responses
│   ├── utils/                       # token validation, prompt helpers, formatters
│   ├── services/                    # Network-only API wrappers (no console, no fs)
│   └── commands/
│       ├── auth/                    # login, logout, whoami
│       ├── project/                 # list, use, info
│       ├── collection/              # list, delete
│       ├── status/                  # status
│       └── doctor/                  # doctor

Backend changes

New file — apps/dashboard-api/src/middlewares/authFlexible.js

A middleware that accepts either a session cookie (browser dashboard) or a Bearer PAT token (CLI). Lets the same routes serve both the web UI and the CLI without duplicating route handlers.

Browser request  → Authorization header absent  → authMiddleware (session cookie)
CLI request      → Authorization: Bearer ubpat_  → authenticateCLI (PAT lookup)

Modified — apps/dashboard-api/src/middlewares/authenticateCLI.js

Added _id to req.user for compatibility with authorizeProject() middleware which reads req.user._id:

// Before
req.user = { id: developer._id.toString() };
 
// After
req.user = { _id: developer._id.toString(), id: developer._id.toString() };

Modified — apps/dashboard-api/src/app.js

Added CLI route exclusion from CSRF protection. CLI authenticates via Bearer PAT, not cookies, so CSRF does not apply:

if (req.path === '/api/billing/webhook' || req.path.startsWith('/api/user/cli')) {
    return next();
}

Modified — apps/dashboard-api/src/routes/projects.js

GET / and GET /:projectId now use authFlexible instead of authMiddleware so the CLI can list and inspect projects.

Modified — apps/dashboard-api/src/routes/analytics.js

GET /stats and GET /activity now use authFlexible so ub status can fetch account usage.

Fixed — apps/dashboard-api/src/controllers/pat.controller.js

Fixed a missing closing brace in revokePAT that caused a SyntaxError on startup after the PAT UI was merged.


Authentication design

  • CLI uses Personal Access Tokens (PATs) — long-lived, revocable, stored as SHA-256 hashes in the pats collection
  • Raw token is shown exactly once at generation time, never stored
  • Token stored locally in ~/.ub/config.json (hidden dot-folder, same convention as GitHub CLI and npm)
  • Config writes are atomic — temp file → rename — to prevent corruption on crash
  • PAT format: ubpat_<env>_<base62>, validated client-side before any network call

Testing

Tested end-to-end against local dashboard-api:

✓ ub login
✓ ub logout
✓ ub whoami
✓ ub project list
✓ ub project use (interactive)
✓ ub project info
✓ ub collection list
✓ ub collection delete (with confirmation)
✓ ub status
✓ ub doctor
✓ ub doctor --json
✓ ub whoami after logout → fails cleanly with correct message

Known gaps / follow-up PRs

  • ub pull / ub push / ub generate — requires POST /projects/:id/sync-schema backend endpoint (Phase 3 in CLI roadmap)
  • ub logs — requires GET /projects/:id/logs streaming endpoint (Phase 4)
  • ub temp-key — requires ephemeral key model and routes (Phase 5)
  • PAT storage uses plain text for MVP — OS keychain (keytar) is the production improvement

Installation (once published)

npm install -g @urbackend/cli
ub login

Summary by CodeRabbit

  • New Features
    • Added a new ub CLI with commands for login/logout, whoami, project and collection management, and status checks (including doctor).
    • Added a CLI profile endpoint (/cli/me) to retrieve your developer details and token info.
  • Bug Fixes
    • Updated CLI authentication to support Bearer PAT requests and expanded CSRF bypass to CLI-related and webhook routes.
    • Improved compatibility for CLI user identity data and adjusted auth error messaging.
  • Tests
    • Expanded route and middleware mocks to cover the new CLI authentication behavior.

@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@Nitin-kumar-yadav1307, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 53 minutes and 5 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9f83c0fa-acf4-49b2-a338-20f20c28e083

📥 Commits

Reviewing files that changed from the base of the PR and between f9ab23f and 13b672c.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml
📝 Walkthrough

Walkthrough

Adds a new @urbackend/cli package with PAT-based auth, project/collection/status/doctor commands, shared SDK services, and CLI build/entrypoint wiring. The dashboard API now supports CLI PAT auth through flexible middleware, a GET /api/user/cli/me endpoint, and route updates for selected analytics and project paths.

Changes

Dashboard API: CLI Auth Integration

Layer / File(s) Summary
CLI auth middleware and CSRF rules
apps/dashboard-api/src/middlewares/authFlexible.js, apps/dashboard-api/src/middlewares/authenticateCLI.js, apps/dashboard-api/src/middlewares/authMiddleware.js, apps/dashboard-api/src/app.js
Adds authFlexible for Bearer PATs, updates CLI request user shaping, changes JWT error logging, and exempts /api/user/cli from CSRF protection.
CLI profile endpoint and route wiring
apps/dashboard-api/src/controllers/cli.controller.js, apps/dashboard-api/src/routes/user.js, apps/dashboard-api/src/routes/analytics.js, apps/dashboard-api/src/routes/projects.js, apps/dashboard-api/src/__tests__/routes.user.test.js
Adds getCLIProfile, wires GET /cli/me, switches analytics stats/activity and project routes to authFlexible, and updates route test mocks.

urBackend CLI SDK

Layer / File(s) Summary
Core runtime and API client
sdks/urbackend-cli/src/core/constants.ts, sdks/urbackend-cli/src/core/config.ts, sdks/urbackend-cli/src/core/errors.ts, sdks/urbackend-cli/src/core/logger.ts, sdks/urbackend-cli/src/core/api.ts
Defines CLI constants, config persistence, APIError, logging helpers, and the HTTP client that injects PAT auth and normalizes API responses.
Types and utilities
sdks/urbackend-cli/src/types/config.ts, sdks/urbackend-cli/src/types/auth.ts, sdks/urbackend-cli/src/types/project.ts, sdks/urbackend-cli/src/types/analytics.ts, sdks/urbackend-cli/src/utils/format.ts, sdks/urbackend-cli/src/utils/prompt.ts, sdks/urbackend-cli/src/utils/token.ts
Adds auth/project/analytics/config interfaces plus formatting, prompt, and PAT validation helpers.
Auth, project, collection, and analytics services
sdks/urbackend-cli/src/services/auth.service.ts, sdks/urbackend-cli/src/services/project.service.ts, sdks/urbackend-cli/src/services/collection.service.ts, sdks/urbackend-cli/src/services/analytics.service.ts
Adds service wrappers for /user/cli/me, /projects, collection endpoints, and analytics endpoints with response normalization.
Auth commands
sdks/urbackend-cli/src/commands/auth/login.ts, sdks/urbackend-cli/src/commands/auth/logout.ts, sdks/urbackend-cli/src/commands/auth/whoami.ts
Adds login, logout, and whoami commands for PAT entry, token persistence, sign-out, and profile display.
Project and collection commands
sdks/urbackend-cli/src/commands/project/info.ts, sdks/urbackend-cli/src/commands/project/list.ts, sdks/urbackend-cli/src/commands/project/use.ts, sdks/urbackend-cli/src/commands/collection/list.ts, sdks/urbackend-cli/src/commands/collection/delete.ts
Adds project list/use/info commands and collection list/delete commands, including interactive selection, confirmation, and formatted output.
Status and doctor commands
sdks/urbackend-cli/src/commands/status/index.ts, sdks/urbackend-cli/src/commands/doctor/index.ts
Adds status and doctor commands for account stats, project checks, recent activity, config presence, API reachability, and JSON output.
Entrypoint and build setup
sdks/urbackend-cli/src/index.ts, sdks/urbackend-cli/bin/ub.js, sdks/urbackend-cli/package.json, sdks/urbackend-cli/tsconfig.json, sdks/urbackend-cli/tsup.config.ts
Adds the ub executable entrypoint, package manifest, TypeScript config, tsup build config, and commander-based command wiring.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • geturbackend/urBackend#336: The main PR’s CLI authentication changes build on the PAT backend work that implements authenticateCLI for Bearer ubpat_ tokens and exposes PAT-authenticated CLI/user routes.

Suggested labels

feature, backend, type:feature

Suggested reviewers

  • yash-pouranik

🐇 I hopped through routes both old and new,
PATs in my paws, and CLI too.
ub login sings, ub doctor peeks,
projects and stats for many weeks.
A carrot toast to auth that’s swift and bright ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.64% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding the official urBackend CLI package.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 16

🧹 Nitpick comments (1)
sdks/urbackend-cli/src/services/analytics.service.ts (1)

9-39: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Import the shared analytics types instead of redefining them here.

sdks/urbackend-cli/src/types/analytics.ts already owns these shapes. Keeping a second copy in the service layer makes the SDK drift the next time the analytics payload changes.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@sdks/urbackend-cli/src/services/analytics.service.ts` around lines 9 - 39,
The analytics shapes are duplicated in the service layer, which can drift from
the shared source of truth. Remove the local GlobalStats and RecentActivityLog
definitions from analytics.service.ts and import the shared types from
sdks/urbackend-cli/src/types/analytics.ts instead, updating any references in
the service to use those imported symbols.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/dashboard-api/src/app.js`:
- Line 82: The CSRF exemption in the request-path check is too broad because
`req.path.startsWith('/api/user/cli')` also matches unrelated routes like
`/api/user/cliff`. Update the path guard in `app.js` so the CLI exemption only
applies to the exact `/api/user/cli` route or paths under `/api/user/cli/`,
while keeping the existing billing webhook exemption unchanged. Use the same
request-handling condition around `req.path` to tighten the match without
affecting other endpoints.

In `@apps/dashboard-api/src/controllers/cli.controller.js`:
- Around line 5-6: The CLI me endpoint is reading the principal from
req.developer._id even though authenticateCLI populates the authenticated
identity on req.user, which can trigger an undefined-property failure before the
not-found path. Update the controller logic in cli.controller.js to use req.user
for the lookup, keeping the existing Developer.findById and select("email plan
githubUsername avatarUrl") flow intact, and ensure any fallback/not-found
handling still works against the authenticated CLI user.

In `@apps/dashboard-api/src/routes/projects.js`:
- Around line 65-66: The collection deletion route is still protected by
authMiddleware, so PAT-based CLI deletes will fail even though the project read
routes already use authFlexible. Update the DELETE handler in the projects
router for the collection deletion path to use authFlexible, keeping it
consistent with getAllProject and getSingleProject so PAT-authenticated requests
can reach the delete logic.

In `@sdks/urbackend-cli/src/commands/auth/login.ts`:
- Around line 15-47: The login command currently logs failures and returns
without setting a non-zero exit status, so `login` can succeed even when
authentication, token validation, or token persistence fails. Update the `login`
flow in the `authenticate`, `saveToken`, and `APIError` handling paths to
terminate with a failing exit code on every error case, including invalid PAT
input, 401 responses, network/API failures, and local write errors from
`saveToken()`. Also separate `saveToken()` from the API `try` so config-write
failures are reported as persistence errors rather than generic connectivity
issues.

In `@sdks/urbackend-cli/src/commands/auth/whoami.ts`:
- Around line 10-45: The whoami command currently only logs errors and returns,
so failures in the not-logged-in path and the APIError handling path still exit
successfully. Update the whoami command logic to return a non-zero exit code
whenever it cannot resolve a valid user identity, including the early token
check, 401 APIError handling, and connectivity failures, while keeping the
existing output behavior for the success path. Use the whoami command flow
around getProfile(), APIError, and logger.error to apply the exit status
consistently.

In `@sdks/urbackend-cli/src/commands/doctor/index.ts`:
- Around line 69-88: The doctor command is collapsing all validation errors into
auth/access failures, so update the `getProfile` and `getProject` checks in
`doctor/index.ts` to distinguish 401 responses from network/backend failures. In
the `result.patValid` and `result.projectAccessible` paths, only set false for
unauthorized responses; for timeouts, DNS, and 5xxs, record a separate “unable
to validate” state instead of marking the token or project invalid. Apply the
same handling in the later validation blocks referenced by the `doctor` flow so
the final report can surface connectivity/backend health separately from login
or project-selection issues.
- Around line 28-35: checkApiReachable currently treats any completed fetch to
apiBase/health as reachable, even if the response is 404 or 500. Update the
checkApiReachable helper in doctor/index.ts to inspect the response from fetch
and only return the elapsed time when the health endpoint responds successfully
(for example, a 2xx status and, if needed, ok is true). If the response is not
successful, return null so doctor does not report the API as reachable for bad
base URLs or failing /health endpoints.

In `@sdks/urbackend-cli/src/commands/project/use.ts`:
- Around line 45-49: The project selection validation in use.ts is too
permissive because parseInt in the prompt handling accepts partially numeric
input like “1foo”. Update the selection logic in the prompt flow around
prompt("Enter project number: ") and the index calculation to validate the
entire answer before converting it, so only pure numeric input is accepted. Keep
the existing invalid-selection check in place and ensure the validation happens
in the same use command path before indexing into projects.

In `@sdks/urbackend-cli/src/core/api.ts`:
- Line 34: The URL construction in api.ts can produce a double slash before api
when config.apiBase already ends with "/", so normalize the base and endpoint
before concatenation. Update the logic around the api endpoint builder to trim
trailing slashes from config.apiBase and ensure endpoint has exactly one leading
slash before composing the final url, so requests from the API client use a
consistent route.
- Around line 38-48: The shared apiFetch() path currently calls fetch() with no
deadline, so CLI requests can hang forever on network stalls; add a timeout
mechanism around the fetch invocation in apiFetch() and ensure timeout-triggered
failures are caught and rethrown as APIError, alongside the existing connection
failure handling. Use the apiFetch() function and its fetch(url, { ...options,
headers }) call as the place to implement this so every CLI command inherits the
bounded request behavior.

In `@sdks/urbackend-cli/src/core/config.ts`:
- Around line 37-40: The token persistence in saveToken currently updates only
pat and leaves currentProject intact, so switching accounts can reuse a stale
project selection. Update saveToken to detect a PAT change and clear
currentProject when the saved token differs from the existing one, using
loadConfig and saveConfig so loginCommand() starts from a clean project state
for the new account.
- Around line 27-34: The config persistence flow in config.ts does not
explicitly restrict permissions, so CONFIG_DIR, the temp file, and CONFIG_PATH
may inherit unsafe modes from the user umask. Update the logic around the
existing atomic write sequence to create the directory with 0700 and write the
PAT file with 0600, then re-apply the file mode after fs.renameSync in the same
save path. Use the existing CONFIG_DIR and CONFIG_PATH constants and the config
write block to keep the fix localized.

In `@sdks/urbackend-cli/src/services/analytics.service.ts`:
- Around line 48-54: The getRecentActivity function is swallowing invalid
analytics responses by returning an empty array, which hides server-side
contract breaks. Update getRecentActivity to validate the apiFetch result and
surface an error when res.data is not a RecentActivityLog[] instead of
converting it to []; use the existing getRecentActivity symbol to locate the
fallback and replace it with explicit failure handling or a thrown error that
preserves the bad payload context.

In `@sdks/urbackend-cli/src/services/collection.service.ts`:
- Around line 31-37: The deleteCollection path is interpolating collectionName
directly into the request URL, so reserved characters can break deletes. Update
deleteCollection in collection.service.ts to URL-encode collectionName before
building the /projects/.../collections/... path, using the same apiFetch call
but with an encoded identifier so names containing /, ?, #, and similar
characters work correctly.

In `@sdks/urbackend-cli/src/utils/prompt.ts`:
- Around line 8-12: The generic prompt helper currently echoes user input, which
is unsafe for secret values. Add a non-echoing secret-input variant in prompt.ts
(for example alongside prompt) that disables terminal echo while reading, and
update the login flow in login.ts to use that secret-specific helper when
capturing the PAT. Keep the existing prompt() for normal input and use unique
identifiers like prompt and the login command’s token capture path to locate the
change.

In `@sdks/urbackend-cli/src/utils/token.ts`:
- Around line 5-6: The PAT validation in isValidPAT is too restrictive because
it hardcodes a narrow charset that can reject server-issued tokens before
authenticateCLI ever hashes them. Update the regex in token.ts so isValidPAT
only enforces the ubpat_ prefix and the minimum remainder length required by the
contract, without assuming the remainder is limited to [a-zA-Z0-9_].

---

Nitpick comments:
In `@sdks/urbackend-cli/src/services/analytics.service.ts`:
- Around line 9-39: The analytics shapes are duplicated in the service layer,
which can drift from the shared source of truth. Remove the local GlobalStats
and RecentActivityLog definitions from analytics.service.ts and import the
shared types from sdks/urbackend-cli/src/types/analytics.ts instead, updating
any references in the service to use those imported symbols.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e403586c-b7e4-4073-b3f1-ff4d5a6df59e

📥 Commits

Reviewing files that changed from the base of the PR and between 030f187 and 576c4cb.

⛔ Files ignored due to path filters (8)
  • package-lock.json is excluded by !**/package-lock.json
  • sdks/urbackend-cli/dist/index.cjs is excluded by !**/dist/**
  • sdks/urbackend-cli/dist/index.cjs.map is excluded by !**/dist/**, !**/*.map
  • sdks/urbackend-cli/dist/index.d.cts is excluded by !**/dist/**
  • sdks/urbackend-cli/dist/index.d.ts is excluded by !**/dist/**
  • sdks/urbackend-cli/dist/index.js is excluded by !**/dist/**
  • sdks/urbackend-cli/dist/index.js.map is excluded by !**/dist/**, !**/*.map
  • sdks/urbackend-cli/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (41)
  • apps/dashboard-api/src/app.js
  • apps/dashboard-api/src/controllers/cli.controller.js
  • apps/dashboard-api/src/controllers/pat.controller.js
  • apps/dashboard-api/src/middlewares/authFlexible.js
  • apps/dashboard-api/src/middlewares/authMiddleware.js
  • apps/dashboard-api/src/middlewares/authenticateCLI.js
  • apps/dashboard-api/src/routes/analytics.js
  • apps/dashboard-api/src/routes/cli.routes.ts
  • apps/dashboard-api/src/routes/projects.js
  • apps/dashboard-api/src/routes/user.js
  • sdks/urbackend-cli/bin/ub.js
  • sdks/urbackend-cli/package.json
  • sdks/urbackend-cli/src/commands/auth/login.ts
  • sdks/urbackend-cli/src/commands/auth/logout.ts
  • sdks/urbackend-cli/src/commands/auth/whoami.ts
  • sdks/urbackend-cli/src/commands/collection/delete.ts
  • sdks/urbackend-cli/src/commands/collection/list.ts
  • sdks/urbackend-cli/src/commands/doctor/index.ts
  • sdks/urbackend-cli/src/commands/project/info.ts
  • sdks/urbackend-cli/src/commands/project/list.ts
  • sdks/urbackend-cli/src/commands/project/use.ts
  • sdks/urbackend-cli/src/commands/status/index.ts
  • sdks/urbackend-cli/src/core/api.ts
  • sdks/urbackend-cli/src/core/config.ts
  • sdks/urbackend-cli/src/core/constants.ts
  • sdks/urbackend-cli/src/core/errors.ts
  • sdks/urbackend-cli/src/core/logger.ts
  • sdks/urbackend-cli/src/index.ts
  • sdks/urbackend-cli/src/services/analytics.service.ts
  • sdks/urbackend-cli/src/services/auth.service.ts
  • sdks/urbackend-cli/src/services/collection.service.ts
  • sdks/urbackend-cli/src/services/project.service.ts
  • sdks/urbackend-cli/src/types/analytics.ts
  • sdks/urbackend-cli/src/types/auth.ts
  • sdks/urbackend-cli/src/types/config.ts
  • sdks/urbackend-cli/src/types/project.ts
  • sdks/urbackend-cli/src/utils/format.ts
  • sdks/urbackend-cli/src/utils/prompt.ts
  • sdks/urbackend-cli/src/utils/token.ts
  • sdks/urbackend-cli/tsconfig.json
  • sdks/urbackend-cli/tsup.config.ts

Comment thread apps/dashboard-api/src/app.js Outdated
Comment thread apps/dashboard-api/src/controllers/cli.controller.js Outdated
Comment thread apps/dashboard-api/src/routes/projects.js
Comment thread sdks/urbackend-cli/src/commands/auth/login.ts
Comment thread sdks/urbackend-cli/src/commands/auth/whoami.ts
Comment thread sdks/urbackend-cli/src/core/config.ts
Comment thread sdks/urbackend-cli/src/services/analytics.service.ts
Comment thread sdks/urbackend-cli/src/services/collection.service.ts
Comment thread sdks/urbackend-cli/src/utils/prompt.ts
Comment thread sdks/urbackend-cli/src/utils/token.ts Outdated
@yash-pouranik

Copy link
Copy Markdown
Member

coderabbit comments are still there
@Nitin-kumar-yadav1307

@Nitin-kumar-yadav1307

Copy link
Copy Markdown
Collaborator Author

fixing

@Nitin-kumar-yadav1307

Copy link
Copy Markdown
Collaborator Author

i am slow bcz i dont have any agentic token left @yash-pouranik

@yash-pouranik

Copy link
Copy Markdown
Member

codex?
copilot?
antigrabvity?
gemini-cli?

@Nitin-kumar-yadav1307

Copy link
Copy Markdown
Collaborator Author

i only use antigravity and copilot @yash-pouranik

@Nitin-kumar-yadav1307

Copy link
Copy Markdown
Collaborator Author

@yash-pouranik i am just fixing proposed fix given rabbit

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Around line 47-48: The CI job is opting into the Redis-backed path via
REDIS_URL without provisioning Redis, so update the workflow to start a Redis
service for this job (or remove the Redis env if it should not use Redis). Make
the change in the ci workflow near the existing env block so the tests can
connect to localhost:6379 during the run.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a0597de7-7002-4057-bbec-0394ace4dc41

📥 Commits

Reviewing files that changed from the base of the PR and between 576c4cb and ca1c70b.

📒 Files selected for processing (13)
  • .github/workflows/ci.yml
  • apps/dashboard-api/src/__tests__/routes.user.test.js
  • apps/dashboard-api/src/app.js
  • apps/dashboard-api/src/controllers/cli.controller.js
  • apps/dashboard-api/src/routes/projects.js
  • sdks/urbackend-cli/src/commands/auth/login.ts
  • sdks/urbackend-cli/src/commands/auth/whoami.ts
  • sdks/urbackend-cli/src/commands/doctor/index.ts
  • sdks/urbackend-cli/src/commands/project/use.ts
  • sdks/urbackend-cli/src/core/api.ts
  • sdks/urbackend-cli/src/core/config.ts
  • sdks/urbackend-cli/src/services/analytics.service.ts
  • sdks/urbackend-cli/src/utils/token.ts
🚧 Files skipped from review as they are similar to previous changes (9)
  • apps/dashboard-api/src/controllers/cli.controller.js
  • sdks/urbackend-cli/src/utils/token.ts
  • apps/dashboard-api/src/app.js
  • apps/dashboard-api/src/routes/projects.js
  • sdks/urbackend-cli/src/commands/auth/login.ts
  • sdks/urbackend-cli/src/commands/auth/whoami.ts
  • sdks/urbackend-cli/src/commands/doctor/index.ts
  • sdks/urbackend-cli/src/core/api.ts
  • sdks/urbackend-cli/src/commands/project/use.ts

Comment thread .github/workflows/ci.yml
Comment thread apps/dashboard-api/src/middlewares/authFlexible.js
Comment thread apps/dashboard-api/src/middlewares/authMiddleware.js
Comment thread apps/dashboard-api/src/routes/analytics.js

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Line 30: The CI workflow YAML has a bad indentation at the services block,
which breaks parsing. Fix the extra leading space before the services key in the
workflow so the mapping aligns correctly with the surrounding jobs/steps
structure. Use the workflow’s services section location to locate the malformed
indentation and ensure the YAML parses cleanly under actionlint and YAMLlint.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d6016a90-bb88-4920-87b8-974da80814dc

📥 Commits

Reviewing files that changed from the base of the PR and between ca1c70b and f9ab23f.

⛔ Files ignored due to path filters (4)
  • sdks/urbackend-cli/dist/index.cjs is excluded by !**/dist/**
  • sdks/urbackend-cli/dist/index.cjs.map is excluded by !**/dist/**, !**/*.map
  • sdks/urbackend-cli/dist/index.js is excluded by !**/dist/**
  • sdks/urbackend-cli/dist/index.js.map is excluded by !**/dist/**, !**/*.map
📒 Files selected for processing (6)
  • .github/workflows/ci.yml
  • apps/dashboard-api/src/middlewares/authMiddleware.js
  • sdks/urbackend-cli/src/commands/auth/login.ts
  • sdks/urbackend-cli/src/commands/doctor/index.ts
  • sdks/urbackend-cli/src/services/collection.service.ts
  • sdks/urbackend-cli/src/utils/prompt.ts
✅ Files skipped from review due to trivial changes (1)
  • apps/dashboard-api/src/middlewares/authMiddleware.js
🚧 Files skipped from review as they are similar to previous changes (3)
  • sdks/urbackend-cli/src/services/collection.service.ts
  • sdks/urbackend-cli/src/commands/auth/login.ts
  • sdks/urbackend-cli/src/commands/doctor/index.ts

Comment thread .github/workflows/ci.yml Outdated
@yash-pouranik
yash-pouranik merged commit be2cef7 into geturbackend:main Jun 28, 2026
8 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Jun 29, 2026
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants